package cn.cqie.frame.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author 谢一弘
 * @date 2021/9/28  8:43
 */
@Data
@ApiModel("查询部门返回实体")
public class DeptVo {
    private static final long serialVersionUID = 1L;

    private Long id;
    @ApiModelProperty(value = "部门代码")
    private String code;

    @ApiModelProperty(value = "部门名称")
    private String name;

    @ApiModelProperty(value = "排序吗")
    @TableField("sortCode")
    private Integer sortCode;

    @ApiModelProperty(value = "上级部门id")
    @TableField("parentId")
    private Long parentId;
    @ApiModelProperty(value = "上级部门名称")
    private String parentName;
    @ApiModelProperty(value = "子菜单")
    @TableField("children")
    private List<DeptVo> children;
    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime cteateTime;
}
